import request from "@/utils/request";

export const getCategory = () => {
  return request({
    url: "/campus/getCategory",
    method: "GET",
  });
};

export const getArticleList = (data) => {
  return request({
    url: "/campus/getArticleList",
    method: "GET",
    data,
  });
};

export const getArticleDetail = (article_id) => {
  return request({
    url: "/campus/getArticleDetail?",
    method: "GET",
    data: { article_id },
  });
};

export const addArticle = (data) => {
  return request({
    url: "/campus/addArticle",
    method: "POST",
    data,
  });
};

export const deletedImage = (urls) => {
  return request({
    url: "/campus/deletedImage",
    method: "POST",
    data: { urls },
  });
};

export const search = (data) => {
  return request({
    url: "/campus/search",
    method: "GET",
    data,
  });
};

export const like = (article_id) => {
  return request({
    url: "/campus/like",
    method: "GET",
    data: { article_id },
  });
};
